package com.open.cloud.rbac.service.orgpost;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.open.cloud.rbac.entity.orgpost.CoreOrganization;
import com.open.cloud.rbac.object.orgpost.CoreOrganizationDto;
import com.open.cloud.rbac.object.orgpost.CoreOrganizationSelectDto;
import com.open.cloud.rbac.object.orgpost.CoreOrganizationVo;

import java.util.List;

/**
 * <p>
 * 组织架构 服务类
 * </p>
 *
 * @author wangzengzhou01
 * @since 2024-12-23
 */
public interface ICoreOrganizationService extends IService<CoreOrganization> {

    /**
     * 新增组织架构
     *
     * @param organizationDto
     * @return
     */
    public JSONObject createOrganizationInfo(CoreOrganizationDto organizationDto);

    /**
     * 修改组织架构
     *
     * @param organizationDto
     * @return
     */
    public JSONObject updateOrganizationInfo(CoreOrganizationDto organizationDto);

    /**
     * 根据组织Id删除
     *
     * @param organizationId
     * @return
     */
    public JSONObject deleteOrganizationInfo(String organizationId);

    /**
     * 分页查询组织
     *
     * @param orgSelectDto
     * @return
     */
    public IPage<CoreOrganization> selectOrganizationPage(CoreOrganizationSelectDto orgSelectDto);

    /**
     * 查询部门组织树列表
     *
     * @param orgSelectDto
     * @return
     */
    public List<CoreOrganizationVo> selectOrganizationTree(CoreOrganizationSelectDto orgSelectDto);

    /**
     * 查询部门组织列表
     *
     * @param orgSelectDto
     * @return
     */
    public List<CoreOrganization> selectOrganizationList(CoreOrganizationSelectDto orgSelectDto);

    /**
     * 根据companyId查询orgId
     *
     * @param companyId
     * @return
     */
    public List<String> selectOrgIdsByCompanyId(String companyId);


}
